TCP Testing

Modify RTL8211F driver

In the V1.1.0 hardware design, the Ethernet PHY chip was replaced from RTL8211E to RTL8211F.

The TXDLY setting for RTL8211F requires configuration through the internal registers of the PHY, rather than being able to be adjusted using hardware resistors like in the case of RTL8211E.

In the xlnx-linux PHY driver, for the PHY_INTERFACE_MODE_GMII interface mode, the TXDLY function is disabled by default.

Currently, the PHY interface mode used by the PL-side expansion port is PHY_interface_MODE_GMII. As a result, under the default driver configuration, the TXDLY function of RTL8211F is not enabled. This may lead to inconsistent TX timing between the PHY and the MAC layer, thereby affecting the normal operation of the port.

The driver is located in linux-xlnx/drivers/net/phy/realtek.c. Please modify the rtl8211f_config_init function accordingly.

After the modification, it is necessary to recompile the image using Petalinux.

TCP_SERVER

Adding Code to Vitis Application Project

Right-click on src to create a new folder:

image-20250710140513635

Create the relevant .c and .h files as shown below:

image-20250714152841219

Compilation and Debugging

Add the required header files:

image-20250714144527291

Core Code

The development board acts as a TCP server (port 12345) and echoes received data back to the sender.

 

Debugging Results

Using the network debugging assistant NetAssist as a client to connect with the implemented server for data transmission and reception.

 

TCP_CLIENT

Adding Code to Vitis Application Project

Right-click on src to create a new folder:

image-20250710140513635

Create the relevant .c and .h files as shown below:

image-20250714152902278

Compilation and Debugging

Add the required header files:

image-20250714153100559

Core Code

The development board acts as a TCP client. After connecting to a server (which can be started on a computer), it will echo back data received from the server.

Debugging Results

First, start the server on the computer, then launch the program in Vitis.

After configuring the host IP and port, it will connect to the server. When the server sends data to the client on the development board, the development board will send the received data back to the server.